package com.qf.threaddemo;

public class ThreadDemo {
    public static void main(String[] args) throws InterruptedException {

        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
//                while (true){
//
//                }
                System.out.println(Thread.currentThread().getName()+":123");
            }
        });
        System.out.println(thread.getState());
//        thread.run();
        // 启动线程
        thread.start();

        Thread.sleep(10);
        System.out.println(thread.getState());

    }
}
